package com.yf.dao;

import com.yf.bean.LogStatisticBean;
import com.yf.bean.SolveLogBean;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public class SolveLogDao extends BaseDao{
    public LogStatisticBean getSolveNum(Long uid) {
        return sessionTemplate.selectOne(getStatement("getSolveNum"), uid);
    }

    public int addLog(List<SolveLogBean> logs) {
        return sessionTemplate.update(getStatement("addLog"), logs);
    }

    public List<SolveLogBean> getRecentLog(Long uid) {
        return sessionTemplate.selectList(getStatement("getRecentLog"), uid);
    }
}
